#include "stdafx.h"
extern unsigned char AlarmState;
extern unsigned char AlarmTimes;
unsigned int V240_T;
void __attribute__((__interrupt__,auto_psv)) _IC1Interrupt(void)
{
// 	LED_270V();	
// 	bAlarm_270V=1;
	
	TMR3=0;
	unsigned int t1,t2,i,T;
	t1=IC1BUF;
	t2=IC1BUF;
	while(_ICBNE) 
		i=IC1BUF;
	if(t2>t1)
		T=t2-t1;
	else
		T=PR3-t1+t2;
	V240_T=T;
	
	_IC1IF=0;
}
